<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>

  </style>
</head>

<body>
  <div class="app"></div>
  <pre>
    let context = {
      commit: { a: 2 },
      state: { b: 3 }
    }
    <script></script>
  </pre>
  <xmp>
    <script>
      let context = {
        commit: { a: 2 },
        state: { b: 3 }
      }
    </script>
  </xmp>
  <script>
    let context = {
      commit: { a: 2 },
      state: { b: 3 }
    }

    function fn1(context) {
      console.log(context.commit.a);
      console.log(context.state.b);
    }

    function fn2({ commit, state }) {
      console.log(commit.a);
      console.log(state.b);
    }
    fn1(context); //2,3

    fn2({
      commit: { a: 2 },
      state: { b: 3 }
    }) //2,3
    let arr = [1, 2, 3, 4, 5];
    arr.splice(1);
    console.log(arr);
  </script>
</body>

</html>